package com.jsu.clubmanagementsystem.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jsu.clubmanagementsystem.model.entity.ClubAnnouncement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 24753
* @description 针对表【club_announcement(社团公告)】的数据库操作Mapper
* @createDate 2025-05-13 17:19:16
* @Entity com.jsu.clubmanagementsystem.model.entity.ClubAnnouncement
*/
public interface ClubAnnouncementMapper extends BaseMapper<ClubAnnouncement> {
    List<ClubAnnouncement> findAllAnnouncements(@Param("ew") Wrapper<ClubAnnouncement> queryWrapper);

    ClubAnnouncement getByIdIncludeDeleted(@Param("id") Long id);

    @Select("select * from club_announcement ${ew.customSqlSegment}")
    List<ClubAnnouncement> selectWrapper(Page<ClubAnnouncement> page, @Param("ew") QueryWrapper query);
}




